import 'package:fish_redux/fish_redux.dart';

enum EngineerListViewAction {
  action,
  onGetData,
  onTapSort,
  setSort,
  onLoad,
}

class EngineerListViewActionCreator {
  static Action onAction() {
    return const Action(EngineerListViewAction.action);
  }

  static Action onGetData(data, page) {
    return Action(
      EngineerListViewAction.onGetData,
      payload: {'items': data, 'page': page},
    );
  }

  static Action onTapSort(index) {
    return Action(EngineerListViewAction.onTapSort, payload: index);
  }

  static Action setSort(index) {
    return Action(EngineerListViewAction.setSort, payload: index);
  }

  static Action onLoad(page) {
    return Action(EngineerListViewAction.onLoad, payload: page);
  }
}
